package com.tahado;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;

import javax.servlet.http.*;

import org.apache.jasper.util.Enumerator;

@SuppressWarnings("serial")
public class Tahado6Servlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {

		PrintWriter out = resp.getWriter();
		out.println("Request Headers <br/>");
		Enumeration headers =  req.getHeaderNames();
		while (headers.hasMoreElements()) {
			String headerName = headers.nextElement().toString();
			out.println(headerName+" :"+ req.getHeader(headerName)+"<br />");
			
		}
		
		out.println("Request Params</br>");
		Enumeration requestParams =  req.getParameterNames();
		while (requestParams.hasMoreElements()) {
			String requestParam = requestParams.nextElement().toString();
			out.println(requestParam+" :"+ req.getParameter(requestParam)+"<br />");
			
		}
	}
}
